Dynomotion

Group: DynoMotion Message: 9232 From: tapiolarikka Date: 2/19/2014
Subject: Mach Notify?
Hi Tom,

Are the Notify messages buffered?
If yes is there any way to prevent buffering?
Rgds,
Tapio
Group: DynoMotion Message: 9233 From: Tom Kerekes Date: 2/19/2014
Subject: Re: Mach Notify?
Hi Tapio,

Yes they are queued for execution in the order received otherwise the Mach3 GUI might be blocked.  You can implement some sort of handshake.  For example in your Mach3 macro you might clear some Virtual IO Bit.  Then issue the Notify.  Then have your notification C code set the Virtual IO bit to indicate it is complete.  Your Mach3 macro could then loop sleeping and polling until the operation is complete. 

HTH
Regards
TK

Group: DynoMotion Message: 9236 From: Tapio Larikka Date: 2/19/2014
Subject: Re: Mach Notify?

Hi Tom,
 
Same problem from other angle:
Which one has faster reaction time setting/clearing bits: with Mach notify message or with Mach outputs?
 
Also: is there a significant speed difference in using If/then or Switch/case to handle the Notify messages on KFlop end?
I now have some 20 If/Then's and the numbers seems to grow.
 
Rgds,
Tapio
 
PS I sure hope I didn't jinx the threading thing :) 
 
----- Original Message -----
Sent: Wednesday, February 19, 2014 10:07 PM
Subject: Re: [DynoMotion] Mach Notify?

 

Hi Tapio,

Yes they are queued for execution in the order received otherwise the Mach3 GUI might be blocked.  You can implement some sort of handshake.  For example in your Mach3 macro you might clear some Virtual IO Bit.  Then issue the Notify.  Then have your notification C code set the Virtual IO bit to indicate it is complete.  Your Mach3 macro could then loop sleeping and polling until the operation is complete. 

HTH
Regards
TK

Group: DynoMotion Message: 9237 From: Tom Kerekes Date: 2/19/2014
Subject: Re: Mach Notify?
Hi Tapio,

I think Mach3 updates the Plugin ~10 times per second.  At that time our plugin sends Outputs that have been changed to KFLOP.

The Notify Operation should be more immediate but send more data to KFLOP and use more USB bandwidth.

I would expect both to be in the 50~100ms range.  But because the PC/Windows/Mach3/USB is involved there is no guaranteed response.  Occasionally the "reaction" time may be seconds.

I think the TCC67 compiler compiles a switch statement like sequential if/thens anyway.  The time should be insignificant at less than 1us per if/then.

Regards
TK